<!-- <!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <input type="file">
  <script>
    var input = document.querySelector('input');
    var head = document.querySelector('head');
    input.onchange = function(){
      var file = input.files[0];
      var read = new FileReader();
      read.readAsText(file);
      read.onload = function(){
        var style = document.createElement('style');
       head.appendChild(style);
       style.innerHTML = this.result;
      }
    }
  </script>
</body>
</html> -->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <input type="file">
  <script>
    var input = document.querySelector('input');
    input.addEventListener('change',function(){
      var file = input.files[0];
      var read = new FileReader();
      read.readAsText(file);
      read.onload = function(){
        var style = document.createElement('style');
        document.querySelector('head').appendChild(style);
        style.innerHTML = this.result;
      }
    })
  </script>
</body>
</html>